<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<title>库存管理系统</title>
		<link rel="stylesheet" type="text/css" href="/static/bootstrap/css/bootstrap.min.css">
		<style type="text/css">
		.body-login {
	        padding-top: 40px;
	        padding-bottom: 40px;
	        background-color: #f5f5f5;
	    }

	    .form-signin {
	        max-width: 266px;
	        padding: 19px 29px 29px;
	        margin: 0 auto 20px;
	        background-color: #fff;
	        border: 1px solid #e5e5e5;
	        -webkit-border-radius: 5px;
	           -moz-border-radius: 5px;
	                border-radius: 5px;
	        -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05);
	           -moz-box-shadow: 0 1px 2px rgba(0,0,0,.05);
	                box-shadow: 0 1px 2px rgba(0,0,0,.05);
	    }
	    .form-signin input {width: 252px;}
	    #menu, #view-store, #view-log {display: none;}
	    #in-modal .dropdown-menu,#out-modal .dropdown-menu {left: auto;right:0;width:253px;}
	    .oe-alert {position: absolute;top:0;left:50%;}
		</style>
		<script type="text/javascript" data-main="/static/js/main" src="/static/js/require.js"></script>
		<script type="text/javascript">var username = "{{username}}";</script>
	</head>
	<body class="body-login">
		<div class="container" id="login-container">
			<div class="form-signin">
				<div class="control-group">
					<label class="control-label" for="login-username">用户名</label>
					<div class="controls">
						<input type="text" name="username" id="login-username" required/>
						<span class="help-block"></span>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label" for="login-password">密码</label>
					<div class="controls">
						<input type="password" name="password" id="login-password" required/>
						<span class="help-block"></span>
					</div>
				</div>
				<p style='text-align: center;'>
					<a href="#" class="btn btn-primary btn-large" id="do-login">登录</a>
				</p>
			</div>
		</div>
		<div class="navbar" id="menu">
		  <div class="navbar-inner">
		    <div class="container">
		      <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
		        <span class="icon-bar"></span>
		        <span class="icon-bar"></span>
		        <span class="icon-bar"></span>
		      </a>
		      <a class="brand" href="#">库存管理</a>
		 
		      <!-- Everything you want hidden at 940px or less, place within here -->
		      <div class="nav-collapse collapse">
		        <ul class="nav">
		        	<li><a href="#" action="in">入库</a></li>
		        	<li><a href="#" action="out">出库</a></li>
		        	<li class="active"><a href="#" action="left">库存</a></li>
		        	<li><a href="#" action="detail">明细</a></li>
		        	<li><a href="/admin/">用户管理</a></li>
		        </ul>
		        <ul class="nav pull-right">
		        	<li><a>欢迎您，<span id="username-placeholder"></span></a></li>
		        	<li><a href="/logout/">退出</a></li>
		        </ul>
		      </div>
		 
		    </div>
		  </div>
		</div>
		<div class="container">
			<div id="view-store">
				<table class="table table-bordered table-strip">
					<thead>
						<tr>
							<th>品号</th>
							<th>品名</th>
							<th>型号</th>
							<th>分类</th>
							<th>库位</th>
							<th>库存</th>
						</tr>
					</thead>
					<tbody></tbody>
				</table>
			</div>
			<div id="view-log">
				<table class="table table-bordered table-strip">
					<thead>
						<tr>
							<th>操作时间</th>
							<th>品号</th>
							<th>品名</th>
							<th>型号</th>
							<th>操作类型</th>
							<th>数量</th>
							<th>结余</th>
							<th>分类</th>
							<th>操作员</th>
							<th>备注</th>
						</tr>
					</thead>
					<tbody></tbody>
				</table>
			</div>
		</div>
		<!-- 入库 -->
		<div id="in-modal" class="modal hide fade" data-backdrop="static">
		  <div class="modal-header">
		    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
		    <h3>入库</h3>
		  </div>
		  <div class="modal-body">
		    <form class="form-horizontal">
		    	<div class="control-group">
		    		<label class="control-label">品号</label>
		    		<div class="controls">
		    			<div class="input-append">
		    				<input type="text" name="number" number required placeholder="输入或选择品号">
			    			<div class="btn-group">
							    <button class="btn dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
							    <ul class="dropdown-menu"></ul>
							</div>
							<span class="help-block"></span>
		    			</div>
		    		</div>
		    	</div>
		    	<div class="control-group" style="display: none;">
		    		<label class="control-label">品名</label>
		    		<div class="controls">
		    			<input type="text" name="name" required/>
		    			<span class="help-block"></span>
		    		</div>
		    	</div>
		    	<div class="control-group" style="display: none;">
		    		<label class="control-label">商品型号</label>
		    		<div class="controls">
		    			<input type="text" name="model_name" required>
		    			<span class="help-block"></span>
		    		</div>
		    	</div>
		    	<div class="control-group" style="display: none;">
		    		<label class="control-label">商品分类</label>
		    		<div class="controls">
		    			<input type="text" name="category" required>
		    			<span class="help-block"></span>
		    		</div>
		    	</div>
		    	<div class="control-group" style="display: none;">
		    		<label class="control-label">单位</label>
		    		<div class="controls">
		    			<input type="text" name="unit" required>
		    			<span class="help-block"></span>
		    		</div>
		    	</div>
		    	<div class="control-group" style="display: none;">
		    		<label class="control-label">库位</label>
		    		<div class="controls">
		    			<input type="text" name="location" required>
		    			<span class="help-block"></span>
		    		</div>
		    	</div>
		    	<div class="control-group">
		    		<label class="control-label">数量</label>
		    		<div class="controls">
		    			<input type="text" name="count" number required>
		    			<span class="help-block"></span>
		    		</div>
		    	</div>
		    	<div class="control-group">
		    		<label class="control-label">备注</label>
		    		<div class="controls">
		    			<textarea name="remark"></textarea>
		    		</div>
		    	</div>
		    </form>
		  </div>
		  <div class="modal-footer">
		    <a href="#" class="btn" action="close">关闭</a>
		    <a href="#" class="btn btn-primary" action="submit">确定</a>
		  </div>
		</div>
		<!-- 出库 -->
		<div id="out-modal" class="modal hide fade" data-backdrop="static">
		  <div class="modal-header">
		    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
		    <h3>出库</h3>
		  </div>
		  <div class="modal-body">
		    <form class="form-horizontal">
		    	<div class="control-group">
		    		<label class="control-label">品号</label>
		    		<div class="controls">
		    			<select name="number"></select>
		    		</div>
		    	</div>
		    	<div class="control-group">
		    		<label class="control-label">数量</label>
		    		<div class="controls">
		    			<input type="text" required number name="count">
		    			<span class="help-block"></span>
		    		</div>
		    	</div>
		    	<div class="control-group">
		    		<label class="control-label">备注</label>
		    		<div class="controls">
		    			<textarea name="remark"></textarea>
		    			<span class="help-block"></span>
		    		</div>
		    	</div>
		    </form>
		  </div>
		  <div class="modal-footer">
		    <a href="#" class="btn" action="close">关闭</a>
		    <a href="#" class="btn btn-primary" action="submit">确定</a>
		  </div>
		</div>
	</body>
</html>